package com.example.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.example.entity.AccDept;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zk
 * @since 2019-07-01
 */
public interface AccDeptMapper extends BaseMapper<AccDept> {
    Integer insertAccDeptList(@Param("AccDepts") List<AccDept> AccClass);

    Integer UpdateAccDeptList(@Param("AccDepts") List<AccDept> AccClass);

    /**
     * 获取下拉框
     *
     * @param deptName
     * @return
     */
    List<Map<String, Object>> selectAccDept(@Param(value = "deptName") String deptName,
                                            @Param(value = "num") Integer num);

    void deleteByDeptId(Integer deptId);

    /**
     * 查询所有的数据，包括逻辑删除的数据
     * @return
     */
    List<AccDept> getAll();

    /**
     * 根据deptName获取一条
     * @param deptName
     * @return
     */
    List<AccDept> getDeptWithNoLogic(@Param("deptName") String deptName);
}
